package com.quanyan.user.service;

import com.quanyan.api.APIResponse;
import com.quanyan.user.model.db.TbUserInterest;
import com.quanyan.user.model.vo.request.ReqUserInterest;
import com.quanyan.user.model.vo.response.RespUserInterest;
import com.quanyan.user.model.vo.response.RespUserSelectInterest;
import com.quanyan.user.response.RespOpenUserInterest;

import java.util.List;
import java.util.Map;

/**
 * Created by yue.yuan on 2016/6/28.
 */
public interface UserInterestService {

    /**
     * 查询系统兴趣列表
     * @return
     */
    APIResponse<List<RespUserInterest>> selectInterestsByExample();

    /**
     * 查询用户兴趣列表
     * @param req
     * @param userId
     * @return
     */
    APIResponse<List<RespUserInterest>> selectUserInterestsByExample(ReqUserInterest req, Integer userId);

    /**
     * 更新用户兴趣列表
     * @param req
     * @param userId
     * @return
     */
    APIResponse<RespUserInterest> updateInterests(ReqUserInterest req, Integer userId);

    /**
     * 获取用户兴趣列表
     * @param userType
     * @param uid
     * @param dsn
     * @param isObtain
     * @return
     */
    List<TbUserInterest> getUserInterestList(Integer userType,Integer uid,String dsn,Byte isObtain);

    /**
     * 批量插入用户兴趣
     * @param uid
     * @param dsn
     * @return
     */
    int batchInsertUserInterest(Integer uid,String dsn, Integer userType);

    /**
     * 更新用户兴趣
     * @param userInterest
     * @param userInterestList
     * @param userType
     * @param uid
     * @param dsn
     * @param isRegister
     * @return
     */
    int updateUserInterest(TbUserInterest userInterest,List<Integer> userInterestList,Integer userType,Integer uid,String dsn,Byte isRegister);

    /**
     * 获取用户选中的兴趣列表
     * @param dsn
     * @param uid
     * @param userType
     * @return
     */
    List<RespUserSelectInterest> getUserSelectInterestList(String dsn,Integer uid,Integer userType);

    @Deprecated
    List<RespUserInterest> getUserSelectInterestIdList(String dsn,Integer uid,Integer userType,Byte isObtain);

    /**
     * 批量查询用户兴趣
     * @param uids
     * @return
     */
    Map<Integer,List<RespOpenUserInterest>> batchQueryUserInterest(List<Integer> uids);


    /**
     * 获取用户标签
     * @return
     */
    public List<Integer>  userInterests(Integer  uid);

    }
